<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 循环输出1到100之间的数字和 
        var y = 0;
        for (let x = 1; x <= 100; x++) {
            y += x; //y=y+x  
        }
        console.log(y);
        // 循环输出1000以内的奇数
        var index = 1000;
        for (var index = 1000; index <= 1000 && index >= 0; index--) {
            if (index % 2 !== 0) {
                console.log(index);

            }


        }
        //打印九九乘法表

        for (let x = 1; x <= 9; x++) {
            // console.log(x);
            for (let y = 1; y <= 9; y++) {
                // console.log(y);
                var sum = 0;
                sum = x * y;
                console.log(sum);

            }


        }
        //将九九乘法表输出在页面上 以一个“面”的形式
        for (var x = 1; x <= 9; x++) {
            document.write("<br>") 
                for (var y = 1; y <= x; y++) {
                let sum = 1;
                sum = x * y
                document.write(x + "*" + y + "=" + sum + "           ")
            }
        }
    </script>
</body>

</html>